 
        【CSS】:only-child(擬似クラス) - 1つのみの要素
CSSの擬似クラス/only-childについて解説します。
検証環境
only-child
擬似クラス/only-childは“兄弟要素がない要素の擬似クラス”です。
基本構文
:only-child {
    プロパティ名: プロパティ値;
}サンプル
only-childを使った『liかつ兄弟要素がない要素』を指定するセレクターのサンプルです。
<style>
___ih_hl_start
li:only-child {
___ih_hl_end
    color: red;
}
</style>
<ul>
    <li>Command</li>
</ul>
<hr>
<ul>
    <li>HTML</li>
    <li>CSS</li>
    <li>JavaScript</li>
</ul> 
         
        ![【コマンドライン】ユーザーのグループ確認 [ groups ]](https://it-hack.net/storage/app/media/document/development/os/command/groups/thumbnail_0001.png) 
        ![【コマンドライン】ユーザー・グループの確認 [ getent ]](https://it-hack.net/storage/app/media/document/development/os/command/getent/thumbnail_0001.png) 
         
         
         
         
         
         
         
        